Repository navigation
Add lumped ports and Z/S-parameters to the Maxwell sweep - #79
xtalax-droid wants to merge 29 commits into
Conversation
A LumpedPort is a rectangular facet sheet across a gap carrying a uniform sheet current; its Z0 load (iωμ0 L/(w²Z0) g gᵀ), Norton source and gap voltage V = L gᵀu/w share one functional g, so the circuit identities hold exactly for the discrete system. Wave and lumped ports mix in one model and one solve_sweep, both normalised to power waves. Validated against transmission-line closed forms on a PMC-sided parallel-plate line. Agent-Harness: Claude Code 2.1.318 Agent-Model: claude-opus-5-5 Agent-Session: ee6a670e-e4ec-446c-b941-3ebb999c45c5 Agent-Review: unreviewed Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Picks up the per-material complex permittivity on absorbing faces, the PEC-rim and port-face checks of wave ports and the u_cell rename. Agent-Harness: Claude Code 2.1.318 Agent-Model: claude-opus-5-5 Agent-Session: ee6a670e-e4ec-446c-b941-3ebb999c45c5 Agent-Review: unreviewed Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Parallel normals and a matching projected area do not make a sheet planar: two half-faces at different heights passed. Check the spread of the facet nodes along the normal, as WavePort already does. Agent-Harness: Claude Code 2.1.318 Agent-Model: claude-opus-5-5 Agent-Session: ee6a670e-e4ec-446c-b941-3ebb999c45c5 Agent-Review: unreviewed Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Agent-Harness: Claude Code 2.1.319 Agent-Model: claude-sonnet-5-5 Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c Agent-Review: unreviewed Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Agent-Harness: Claude Code 2.1.322 Agent-Model: claude-sonnet-5-5 Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c Agent-Review: unreviewed Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Conflicts: docs/src/maxwell.md kept both sections; src/maxwell/ports.jl keeps the lumped-port structure and applies the exact-cutoff ArgumentError (same message and test as the wave-port-only version) through _check_not_at_cutoff, which skips lumped ports. Agent-Harness: Claude Code 2.1.322 Agent-Model: claude-sonnet-5-5 Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c Agent-Review: unreviewed Co-authored-by: Claude Code <agent@noreply.juliahub.com>
…c Ferrite API Ferrite.reference_facets and dirichlet_facetdof_indices are not public; lumped.jl now uses the tables defined for the wave ports and the PEC edge dofs. Agent-Harness: Claude Code 2.1.322 Agent-Model: claude-sonnet-5-5 Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c Agent-Review: unreviewed Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Independent review (Codex CLI v0.164.0 / gpt-6.1-sol), reviewer session 01a1c8f4-627a-7403-b745-eaea046773fb, reviewed head e3527fe
This is a blind code-only review by a session other than the PR author's, copied below from the reviewer's report with only the grading metadata removed. The posting agent did not re-run the reviewer's commands. A MERGE verdict is advice; merging is left to the maintainers. Riskmedium-low (ML7: additive documented Maxwell model, driven solver, ports and sweep API; existing entry points unchanged). Blocking findings
[P2] Confirmed by running. I used a 10 × 5 × 20 mm parallel-plate model, function reuse_solution(A, B, cache)
F = cache === nothing ? lu(A) : lu!(cache[1], A)
U = cache === nothing ? similar(B) : cache[2]
copyto!(U, F \ B)
return U, (F, U)
endWith Suggested fix: snapshot Non-blocking findingsNone. What I ranReview by an AI agent using codex-cli 0.164.0, model gpt-6.1-sol; the session above is a local session with no available session URL. Risk was recorded independently before reading any author rating; no PR body, comments, earlier review or rating was read. Root Exported the requested
With GROUP=Maxwell julia --project="$S/review-head" --startup-file=no -e 'using Pkg; Pkg.instantiate(); Pkg.test()'
GROUP=QA julia --project="$S/review-head" --startup-file=no -e 'using Pkg; Pkg.test()'
julia --project="$S/review-head" --startup-file=no "$S/probes.jl"
julia --project="$S/review-head" --startup-file=no "$S/residual-probe.jl"
Logs and probe scripts are in this review's What I did not verifyOther Julia versions/platforms, the full unrelated test suite, the full documentation build, CI results, and allocation/performance claims. No author PR claims were consulted. No owning-head issue links were supplied or checked, so this round-two P2 has no verified deferral. No commits, pushes, GitHub posts, or checkout edits were made. 🤖 Posted by an AI agent — harness: Claude Code 2.1.322 · model: claude-sonnet-5-5 |
Agent-Harness: Claude Code 2.1.322 Agent-Model: claude-sonnet-5-5 Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c Agent-Review: unreviewed Co-authored-by: Claude Code <agent@noreply.juliahub.com>
A solver that reuses its output buffer must not alias the stored frequencies; each stored field is checked against its own equation. Agent-Harness: Claude Code 2.1.322 Agent-Model: claude-sonnet-5-5 Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c Agent-Review: unreviewed Co-authored-by: Claude Code <agent@noreply.juliahub.com>
An interior sheet listed from each of its two cells has disjoint FacetIndex sets but is one sheet; the overlap check of boundary conditions now compares sorted facet node identities. Agent-Harness: Claude Code 2.1.322 Agent-Model: claude-sonnet-5-5 Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c Agent-Review: unreviewed Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Agent-Harness: Claude Code 2.1.322 Agent-Model: claude-sonnet-5-5 Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c Agent-Review: unreviewed Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Agent-Harness: Claude Code 2.1.322 Agent-Model: claude-sonnet-5-5 Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c Agent-Review: unreviewed Co-authored-by: Claude Code <agent@noreply.juliahub.com>
|
Review feedback on this PR has been addressed on head Stacked on #75. Items deliberately left as they are: reaction coefficients that are subnormal but representable are still rejected (conservative); coefficients that cancel to zero only up to roundoff are rejected rather than compared with a tolerance; the absorbing-boundary adjoint derivative uses 0 for the sigma term at omega = 0 although the true limit is finite and nonzero. 🤖 Posted by an AI agent · harness: Claude Code 2.1.322 · model: claude-sonnet-5-5 |
Independent review (Codex CLI v0.164.0 / gpt-6.1-sol), reviewer session 01a1ceeb-50ee-7b20-9035-e0048e5e55b3, reviewed head 5e60574
This is a blind code-only review by a session other than the PR author's, copied below from the reviewer's report with only the grading metadata removed. The posting agent did not re-run the reviewer's commands. A MERGE verdict is advice; merging is left to the maintainers. CI: green Riskmedium-low (ML7: additive, documented Maxwell model, driven solver, ports and sweep API; existing entry points unchanged). Blocking findingsNone. The prior retained-field blocker is resolved by the snapshot at
Non-blocking findingsNone. What I ranAI reviewer: codex-cli 0.164.0, model gpt-6.1-sol; local session identified above, no session URL available. Recorded risk before reading the designated prior-head review. Read that review, the delta from Exported the requested With GROUP=Maxwell julia --project="$S/review-head" --startup-file=no -e 'using Pkg; Pkg.instantiate(); Pkg.test()'
bash "$S/run-remaining.sh"
uv run --locked python --version
git diff --check origin/master...HEAD
What I did not verifyOther Julia versions/platforms, unrelated test groups, the full documentation build, formatting/spelling checks, or performance. CI green is supplied task metadata, not independently inspected. No GitHub access, posts, commits, pushes, or checkout edits were made. 🤖 Posted by an AI agent — harness: Claude Code 2.1.322 · model: claude-sonnet-5-5 |
Agent-Harness: Claude Code 2.1.322 Agent-Model: claude-sonnet-5-5 Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c Agent-Review: unreviewed Co-authored-by: Claude Code <agent@noreply.juliahub.com>
The wave impedance is infinite below cutoff, so at omega = 0 the power-wave scale is 0/0 and the scattering matrix came out all NaN; s_parameters and port_excitations now throw an ArgumentError for a wave port at omega = 0. Agent-Harness: Claude Code 2.1.322 Agent-Model: claude-sonnet-5-5 Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c Agent-Review: unreviewed Co-authored-by: Claude Code <agent@noreply.juliahub.com>
|
Follow-up to the latest review on head Codex review of the branch approved with no open findings, and all named CI checks are green on this head. Merge commits only; no rebase or force-push. 🤖 Posted by an AI agent · harness: Claude Code 2.1.322 · model: claude-sonnet-5-5 |
Agent-Harness: Claude Code 2.1.322 Agent-Model: claude-sonnet-5-5 Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c Agent-Review: unreviewed Co-authored-by: Claude Code <agent@noreply.juliahub.com>
…ation At omega = 0 the propagation constant is -i kc and the wave impedance is 0, not infinite; the power-wave amplitude factor sqrt(beta/(omega mu)) diverges. The infinite-impedance explanation is kept for exact cutoff only. The guard and its tests are unchanged apart from the message match. Agent-Harness: Claude Code 2.1.322 Agent-Model: claude-sonnet-5-5 Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c Agent-Review: unreviewed Co-authored-by: Claude Code <agent@noreply.juliahub.com>
…ports Consistent with the below-cutoff note on WavePort. Agent-Harness: Claude Code 2.1.322 Agent-Model: claude-sonnet-5-5 Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c Agent-Review: unreviewed Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Agent-Harness: Claude Code 2.1.322 Agent-Model: claude-sonnet-5-5 Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c Agent-Review: unreviewed Co-authored-by: Claude Code <agent@noreply.juliahub.com>
The lumped port tests read the local facet nodes from a function that is not public in Ferrite; the package's own table is now checked against the geometry in test/Maxwell/model.jl and used here. Agent-Harness: Claude Code 2.1.322 Agent-Model: claude-sonnet-5-5 Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c Agent-Review: unreviewed Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Independent review (Codex CLI v0.164.0 / gpt-6.1-sol), reviewer session 01a1d11c-f713-7e31-a83b-1c1c175eb44b, reviewed head a822abc
This is a blind code-only review by a session other than the PR author's, copied below from the reviewer's report with only the grading metadata removed. The posting agent did not re-run the reviewer's commands. A MERGE verdict is advice; merging is left to the maintainers. CI: green Riskmedium-low (ML7: additive, documented Maxwell API; existing entry points and defaults unchanged). Blocking findings
Non-blocking findingsNone. What I ranReviewer: AI agent using Codex, model
What I did not verify
🤖 Posted by an AI agent — harness: Claude Code 2.1.322 · model: claude-sonnet-5-5 |
Agent-Harness: Claude Code 2.1.322 Agent-Model: claude-sonnet-5-5 Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c Agent-Review: unreviewed Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Agent-Harness: Claude Code 2.1.322 Agent-Model: claude-sonnet-5-5 Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c Agent-Review: unreviewed Co-authored-by: Claude Code <agent@noreply.juliahub.com>
At omega = 0 the Norton excitation and port loading vanish, leaving the singular curl-curl operator with a zero right-hand side, so a lumped-port sweep returned S = -I instead of failing; zero frequency is now an ArgumentError before any solve (no test or documented behaviour used it). Agent-Harness: Claude Code 2.1.322 Agent-Model: claude-sonnet-5-5 Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c Agent-Review: unreviewed Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Agent-Harness: Claude Code 2.1.322 Agent-Model: claude-sonnet-5-5 Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c Agent-Review: unreviewed Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Agent-Harness: Claude Code 2.1.322 Agent-Model: claude-sonnet-5-5 Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c Agent-Review: unreviewed Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Agent-Harness: Claude Code 2.1.322 Agent-Model: claude-sonnet-5-5 Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c Agent-Review: unreviewed Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Agent-Harness: Claude Code 2.1.322 Agent-Model: claude-sonnet-5-5 Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c Agent-Review: unreviewed Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Agent-Harness: Claude Code 2.1.322 Agent-Model: claude-sonnet-5-5 Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c Agent-Review: unreviewed Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Independent review (Codex CLI v0.164.0 / gpt-6.1-sol), reviewer session 01a1d1c6-a35b-7a83-8a67-cf3870f6d9bd, reviewed head cd72766
This is a blind code-only review by a session other than the PR author's, copied below from the reviewer's report with only the grading metadata removed. The posting agent did not re-run the reviewer's commands. A MERGE verdict is advice; merging is left to the maintainers. CI: CI is not green Riskmedium-low (ML7: additive, documented and tested Maxwell API; existing entry points and defaults unchanged). Blocking findingsNone. Both prior blockers are resolved by running the checks below. No additional blocker was confirmed in the delta.
Non-blocking findings
What I ranReviewer: AI agent using Codex, model
What I did not verifyOther test groups, QA, docs build/rendering, other Julia versions and performance benchmarks. No project-locked interpreter/dependency environment was available. CI status is supplied by the assignment; its non-green state was not investigated through GitHub. No PR body, discussion, author risk rating or sibling review artifacts were inspected. No checkout edits, fixes, commits, pushes or GitHub posts were made. 🤖 Posted by an AI agent — harness: Claude Code 2.1.322 · model: claude-sonnet-5-5 |
Agent-Harness: Claude Code 2.1.322 Agent-Model: claude-sonnet-5-5 Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c Agent-Review: unreviewed Co-authored-by: Claude Code <agent@noreply.juliahub.com>
PR: #79 Reviewed head: e0a8f64 Risk assessment
Review reportVERDICT: MERGE Riskmedium-low (ML7: additive, documented Maxwell solver and port APIs; existing entry points and defaults are unchanged). Blocking findingsNone identified in the diff or reproduced by the tests and probes. Numerical evidence includes independent manufactured fields and analytic transmission-line references, rather than agreement with the implementation alone.
Non-blocking findingsNone. What I ranReviewer: codex-cli 0.164.0, model gpt-6.1-sol. Read the checkout, complete diff, affected tests, documentation and risk criteria; neither root AGENTS.md nor root CLAUDE.md exists in this checkout. No PR discussion, author rating or earlier review was inspected. All Julia runs used the supplied TMPDIR, preserved JULIA_DEPOT_PATH, four Julia threads, four precompile tasks and one OpenBLAS thread, inside a 10 GiB memory scope. Environment and probe files are under
What I did not verifyFull-package/QA groups, the complete documentation build, Julia LTS/other supported versions, or minimum dependency versions. No repository Julia Manifest or interpreter pin is supplied, so dependency verification uses the generated scratch manifest. CI was not inspected; the supplied non-green CI status remains a merge gate. MERGE is code-review advice only. AUTHOR_GRADE: {"task":"feature","score":5,"difficulty":4,"rounds":6,"author_harness":"Claude Code 2.1.322","author_model":"claude-sonnet-5-5","note":"All 292 affected assertions and 17 independent probes passed on the reviewed head, including analytic convergence, port scaling, rotation and field accuracy; CI, QA, documentation build and other supported environments remain unverified."} Head link: e0a8f64 🤖 Posted by an AI agent — harness: codex-cli 0.164.0 · model: gpt-6.1-sol |
Agent-Harness: Claude Code 2.1.322 Agent-Model: claude-sonnet-5-5 Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c Agent-Review: unreviewed Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Depends on #75 (this PR targets its branch, so the diff shows only this layer; it will be retargeted once the layers below merge).
Adds
LumpedPort(facetset; direction, Z0 = 50): a rectangular facet sheet bridging a gap between conductors, on the boundary or inside the mesh.What's added
direction; its gap voltage is the sheet-averaged line integralV = (1/w) ∮ E·l̂ dS. Every port is loaded by its reference impedance through a rank-one termiωμ0 L/(w² Z0) g gᵀwithgᵢ = ∮ l̂·Nᵢ dS, and the driven port adds a 1 A Norton sourceiωμ0 g/w.Sᵢⱼ = 2Vᵢ/sqrt(Z0ᵢZ0ⱼ) − δᵢⱼholds exactly for the discrete system and S is unitary for a lossless structure. (A distributed resistive sheet would dissipateσ∫|E_l|² ≥ |V|²/Z0, i.e. more than the lumped circuit whenever the gap field is non-uniform.)portsand insolve_sweep: one factorisation per frequency, one right-hand side per port, an N×N S-matrix normalised to power waves.model.portsnow holds both kinds.direction; a facet listed from both of its cells counts once (interior sheets).port_voltage,port_current,z_parameters.Validation (Maxwell group, ~24 s added)
PMC-sided parallel-plate line, W = 10 mm, h = 5 mm, L = 20 mm, 3 GHz, against transmission-line closed forms:
Also: multiple right-hand sides from one factorisation equal separate solves to 1e-10; Z recovers the open-circuit impedances; invalid sheets are rejected. Maxwell group (lumped 60, manufactured 4, model 80, ports 49) and QA 21/21 pass.
Docs: a lumped-port section in
docs/src/maxwell.md.Review pointers
model.portschanged element type and theportskeyword default is now[].directionis the + terminal.🤖 Posted by an AI agent · harness: Claude Code 2.1.318 · model: claude-opus-5-5
Review: unreviewed
Session: ee6a670e-e4ec-446c-b941-3ebb999c45c5